package com.lagou.service.impl;

import com.lagou.service.TimeService;
import org.apache.commons.lang3.RandomUtils;
import org.apache.dubbo.config.annotation.Service;

@Service
public class TimeServiceImpl implements TimeService {

    @Override
    public String methodA() {
        int i = RandomUtils.nextInt(0, 100);
        try {
            Thread.sleep(i);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "methodA";
    }

    @Override
    public String methodB() {
        int i = RandomUtils.nextInt(0, 100);
        try {
            Thread.sleep(i);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "methodB";
    }

    @Override
    public String methodC() {
        int i = RandomUtils.nextInt(0, 100);
        try {
            Thread.sleep(i);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "methodC";
    }

}
